local world = import('..controllers.world')

local MainScene = class("MainScene", function()
    --return display.newScene("MainScene")
    return display.newPhysicsScene("MainScene")
end)

WORLDBOX_TAG = 100100

function MainScene:ctor()
	world:new():addTo(self)
	display.newSolidCircle(8,{color = cc.c4f(1.0,0,0,0.5)}):addTo(self)
	self.world = self:getPhysicsWorld()
	self.world:setDebugDrawMask(cc.PhysicsWorld.DEBUGDRAW_ALL)
	self.world:setGravity(cc.p(0,0))

	self.worldBox = cc.PhysicsBody:createEdgeBox(cc.size(display.width*1.5,display.height*1.5))
	self.worldBox:setDynamic(false)
	self.worldBox:setContactTestBitmask(-1)
	self.worldBox:setTag(WORLDBOX_TAG)
	local node = display.newNode():addTo(self)
	node:setAnchorPoint(cc.p(0.5,0.5))
	node:setPhysicsBody(self.worldBox)
	node:pos(display.cx,display.cy)

end

function MainScene:onEnter()
end

function MainScene:onExit()
end

return MainScene
